*********************************************************************************
*** Table 2
*********************************************************************************

* Project: 	International threats and European defense
* Authors: 	Matthias Mader
* Date:		March 2023	

* Data: VW Project, Pane-European survey (W1)

*********************************************************************************

*** Setup

	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme plotplainblind, permanent				// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"



*** Table 2

	use Pan_EuropeanData_CLEAN, clear

	*column 1

	forvalues val = 1/25 {
	reg csdp_wouldlike c.threat_ind2 i.idconfig2 female age ib2.education iso comp mili if QCOUNTRY==`val'
	estimates store m`val'
}

	*columns 2, 3

	forvalues val = 1/25 {
	reg csdp_wouldlike c.threat_ind2##i.idconfig2 female age ib2.education iso comp mili if QCOUNTRY==`val'
	estimate store m`val'
}
	forvalues val = 1/25 {
	estimate restore m`val'
	margins, dydx(threat_ind2) at(idconfig2=(1 2))
}

	*column 4

	forvalues val = 1/25 {
	fre QCOUNTRY if QCOUNTRY==`val'
	reg csdp_wouldlike c.threat_ind2##i.idconfig2 female age ib2.education iso comp mili if QCOUNTRY==`val'
}


